
#Testing 2D conjugate gradient method
aa=matrix([
[     32401.002,           -0.0,     -16200.001,            0.0,            0.0,            0.0,            0.0,            0.0],
[          -0.0,            1.0,            0.0,           -0.0,            0.0,            0.0,            0.0,            0.0],
[    -16200.001,           -0.0,      32401.002,            0.0,     -16200.001,            0.0,            0.0,            0.0],
[          -0.0,           -0.0,            0.0,            1.0,            0.0,           -0.0,            0.0,            0.0],
[           0.0,            0.0,     -16200.001,           -0.0,      32401.002,            0.0,     -16200.001,            0.0],
[           0.0,            0.0,           -0.0,           -0.0,            0.0,            1.0,            0.0,           -0.0],
[           0.0,            0.0,            0.0,            0.0,     -16200.001,           -0.0,      16201.001,            0.0],
[           0.0,            0.0,            0.0,            0.0,           -0.0,           -0.0,            0.0,            1.0]
]);

bb=vector(
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -13500.0, 0.0]
);

xx = aa \ bb;

aaa=matrix([
[   129601.01, 2.6063213e-05,   -64800.004,            0,            0,            0,            0,            0],
[2.6063213e-05,            1,            0,           -0,            0,            0,            0,            0],
[  -64800.004,           -0,    129601.01,            0,   -64800.004,            0,            0,            0],
[          -0,           -0,            0,            1,            0,           -0,            0,            0],
[           0,            0,   -64800.004,           -0,    129601.01,            0,   -64800.004,            0],
[           0,            0,           -0,           -0,            0,            1,            0,           -0],
[           0,            0,            0,            0,   -64800.004,           -0,    64801.004,            0],
[           0,            0,            0,            0,           -0,           -0,            0,            1]
]);

bbb=vector(
[19.925781, -1.0859741e-05, -19.925781, -6.867e-11, -19.925781, -6.867e-11, -26980.074, -6.867e-11]
);

xxx = aaa \ bbb;
